home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
- Begin VB.Form frmMain
- BorderStyle = 1 'Fixed Single
- Caption = "Explorer Sample"
- ClientHeight = 8070
- ClientLeft = 150
- ClientTop = 720
- ClientWidth = 10440
- LinkTopic = "Form1"
- ScaleHeight = 8070
- ScaleWidth = 10440
- StartUpPosition = 3 'Windows Default
- Begin VB.Timer Timer1
- Left = 9840
- Top = 2280
- End
- Begin VB.FileListBox File1
- Height = 285
- Hidden = -1 'True
- Left = 9240
- System = -1 'True
- TabIndex = 14
- Top = 1440
- Visible = 0 'False
- Width = 1215
- End
- Begin VB.DirListBox Dir1
- Height = 315
- Left = 9240
- TabIndex = 13
- Top = 1080
- Visible = 0 'False
- Width = 1215
- End
- Begin VB.DriveListBox Drive1
- Height = 315
- Left = 9240
- TabIndex = 12
- Top = 720
- Visible = 0 'False
- Width = 1215
- End
- Begin VB.PictureBox Picture3
- AutoSize = -1 'True
- Height = 615
- Left = 5520
- ScaleHeight = 555
- ScaleWidth = 555
- TabIndex = 11
- Top = 6120
- Visible = 0 'False
- Width = 615
- End
- Begin VB.PictureBox Picture2
- AutoSize = -1 'True
- Height = 615
- Left = 4800
- ScaleHeight = 555
- ScaleWidth = 555
- TabIndex = 10
- Top = 6120
- Visible = 0 'False
- Width = 615
- End
- Begin VB.PictureBox Picture1
- AutoSize = -1 'True
- Height = 615
- Left = 4080
- ScaleHeight = 555
- ScaleWidth = 555
- TabIndex = 9
- Top = 6120
- Visible = 0 'False
- Width = 615
- End
- Begin VB.TextBox txtValue
- Height = 495
- Left = 4080
- TabIndex = 8
- Top = 5520
- Visible = 0 'False
- Width = 4695
- End
- Begin MSComctlLib.ImageList ImageList3
- Left = 9240
- Top = 3000
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- End
- Begin MSComctlLib.ImageList ImageList2
- Left = 9240
- Top = 2400
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- MaskColor = 12632256
- _Version = 393216
- End
- Begin MSComctlLib.ImageList ImageList1
- Left = 9240
- Top = 1800
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- MaskColor = 12632256
- _Version = 393216
- End
- Begin VB.PictureBox picSplitter
- BackColor = &H00808080&
- BorderStyle = 0 'None
- FillColor = &H00808080&
- Height = 4800
- Left = 9120
- ScaleHeight = 2090.126
- ScaleMode = 0 'User
- ScaleWidth = 780
- TabIndex = 7
- Top = 720
- Visible = 0 'False
- Width = 72
- End
- Begin MSComctlLib.TreeView tvTreeView
- Height = 4800
- Left = 0
- TabIndex = 6
- Top = 720
- Width = 3330
- _ExtentX = 5874
- _ExtentY = 8467
- _Version = 393217
- Style = 7
- SingleSel = -1 'True
- ImageList = "ImageList3"
- BorderStyle = 1
- Appearance = 1
- End
- Begin MSComctlLib.ListView lvListView
- Height = 4800
- Left = 3360
- TabIndex = 5
- Top = 720
- Width = 5730
- _ExtentX = 10107
- _ExtentY = 8467
- Arrange = 2
- LabelEdit = 1
- Sorted = -1 'True
- MultiSelect = -1 'True
- LabelWrap = -1 'True
- HideSelection = 0 'False
- AllowReorder = -1 'True
- FullRowSelect = -1 'True
- HotTracking = -1 'True
- _Version = 393217
- Icons = "ImageList1"
- SmallIcons = "ImageList2"
- ForeColor = -2147483640
- BackColor = -2147483643
- BorderStyle = 1
- Appearance = 1
- NumItems = 4
- BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
- Text = "Name"
- Object.Width = 2540
- EndProperty
- BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
- SubItemIndex = 1
- Text = "in"
- Object.Width = 2540
- EndProperty
- BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
- SubItemIndex = 2
- Text = "Size"
- Object.Width = 2540
- EndProperty
- BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628}
- SubItemIndex = 3
- Text = "Type"
- Object.Width = 2540
- EndProperty
- End
- Begin VB.PictureBox picTitles
- Align = 1 'Align Top
- Appearance = 0 'Flat
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 300
- Left = 0
- ScaleHeight = 300
- ScaleWidth = 10440
- TabIndex = 2
- TabStop = 0 'False
- Top = 420
- Width = 10440
- Begin VB.Label lblTitle
- BorderStyle = 1 'Fixed Single
- Caption = " ListView:"
- Height = 270
- Index = 1
- Left = 2078
- TabIndex = 4
- Tag = " ListView:"
- Top = 12
- Width = 3216
- End
- Begin VB.Label lblTitle
- BorderStyle = 1 'Fixed Single
- Caption = " TreeView:"
- Height = 270
- Index = 0
- Left = 0
- TabIndex = 3
- Tag = " TreeView:"
- Top = 12
- Width = 2016
- End
- End
- Begin MSComctlLib.Toolbar tbToolBar
- Align = 1 'Align Top
- Height = 420
- Left = 0
- TabIndex = 1
- Top = 0
- Width = 10440
- _ExtentX = 18415
- _ExtentY = 741
- ButtonWidth = 609
- ButtonHeight = 582
- Appearance = 1
- ImageList = "imlToolbarIcons"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 16
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "Cut"
- Object.ToolTipText = "Cut"
- ImageKey = "Cut"
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "Copy"
- Object.ToolTipText = "Copy"
- ImageKey = "Copy"
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "Paste"
- Object.ToolTipText = "Paste"
- ImageKey = "Paste"
- EndProperty
- BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "Delete"
- Object.ToolTipText = "Delete"
- ImageKey = "Delete"
- EndProperty
- BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "Properties"
- Object.ToolTipText = "Properties"
- ImageKey = "Properties"
- EndProperty
- BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "Up One Level"
- Object.ToolTipText = "Up One Level"
- ImageKey = "Up One Level"
- EndProperty
- BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "Map Network Drive"
- Object.ToolTipText = "Map Network Drive"
- ImageKey = "Map Network Drive"
- EndProperty
- BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "Find"
- Object.ToolTipText = "Find"
- ImageKey = "Find"
- EndProperty
- BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "Help"
- Object.ToolTipText = "Help"
- ImageKey = "Help"
- EndProperty
- BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "View Large Icons"
- Object.ToolTipText = "View Large Icons"
- ImageKey = "View Large Icons"
- Style = 2
- EndProperty
- BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "View Small Icons"
- Object.ToolTipText = "View Small Icons"
- ImageKey = "View Small Icons"
- Style = 2
- EndProperty
- BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "View List"
- Object.ToolTipText = "View List"
- ImageKey = "View List"
- Style = 2
- EndProperty
- BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "View Details"
- Object.ToolTipText = "View Details"
- ImageKey = "View Details"
- Style = 2
- EndProperty
- EndProperty
- End
- Begin MSComctlLib.StatusBar sbStatusBar
- Align = 2 'Align Bottom
- Height = 270
- Left = 0
- TabIndex = 0
- Top = 7800
- Width = 10440
- _ExtentX = 18415
- _ExtentY = 476
- _Version = 393216
- BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
- NumPanels = 3
- BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
- AutoSize = 1
- Object.Width = 13229
- Text = "Free Space :"
- TextSave = "Free Space :"
- EndProperty
- BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
- Style = 6
- AutoSize = 2
- TextSave = "9/22/99"
- EndProperty
- BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
- Style = 5
- AutoSize = 2
- TextSave = "3:57 PM"
- EndProperty
- EndProperty
- End
- Begin MSComDlg.CommonDialog dlgCommonDialog
- Left = 9840
- Top = 1800
- _ExtentX = 847
- _ExtentY = 847
- _Version = 393216
- End
- Begin MSComctlLib.ImageList imlToolbarIcons
- Left = 9240
- Top = 3600
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 13
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmMain.frx":0000
- Key = "Cut"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmMain.frx":0112
- Key = "Copy"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmMain.frx":0224
- Key = "Paste"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmMain.frx":0336
- Key = "Delete"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmMain.frx":0448
- Key = "Properties"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmMain.frx":055A
- Key = "Up One Level"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmMain.frx":066C
- Key = "Map Network Drive"
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmMain.frx":077E
- Key = "Find"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmMain.frx":0890
- Key = "Help"
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmMain.frx":09A2
- Key = "View Large Icons"
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmMain.frx":0AB4
- Key = "View Small Icons"
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmMain.frx":0BC6
- Key = "View List"
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "frmMain.frx":0CD8
- Key = "View Details"
- EndProperty
- EndProperty
- End
- Begin VB.Image imgSplitter
- Height = 4785
- Left = 3360
- MousePointer = 9 'Size W E
- Top = 720
- Width = 150
- End
- Begin VB.Menu mnuFile
- Caption = "&File"
- Begin VB.Menu mnuFileOpen
- Caption = "&Open..."
- End
- Begin VB.Menu mnuFileFind
- Caption = "&Find"
- End
- Begin VB.Menu mnuFileBar0
- Caption = "-"
- End
- Begin VB.Menu mnuFileSendTo
- Caption = "Sen&d to"
- End
- Begin VB.Menu mnuFileBar1
- Caption = "-"
- End
- Begin VB.Menu mnuFileNew
- Caption = "&New"
- Shortcut = ^N
- End
- Begin VB.Menu mnuFileBar2
- Caption = "-"
- End
- Begin VB.Menu mnuFileDelete
- Caption = "&Delete"
- End
- Begin VB.Menu mnuFileRename
- Caption = "Rena&me"
- End
- Begin VB.Menu mnuFileProperties
- Caption = "Propert&ies"
- End
- Begin VB.Menu mnuFileBar3
- Caption = "-"
- End
- Begin VB.Menu mnuFileMRU
- Caption = ""
- Index = 1
- Visible = 0 'False
- End
- Begin VB.Menu mnuFileMRU
- Caption = ""
- Index = 2
- Visible = 0 'False
- End
- Begin VB.Menu mnuFileMRU
- Caption = ""
- Index = 3
- Visible = 0 'False
- End
- Begin VB.Menu mnuFileBar4
- Caption = "-"
- Visible = 0 'False
- End
- Begin VB.Menu mnuFileBar5
- Caption = "-"
- End
- Begin VB.Menu mnuFileClose
- Caption = "&Close"
- End
- End
- Begin VB.Menu mnuEdit
- Caption = "&Edit"
- Begin VB.Menu mnuEditUndo
- Caption = "&Undo"
- End
- Begin VB.Menu mnuEditBar0
- Caption = "-"
- End
- Begin VB.Menu mnuEditCut
- Caption = "Cu&t"
- Shortcut = ^X
- End
- Begin VB.Menu mnuEditCopy
- Caption = "&Copy"
- Shortcut = ^C
- End
- Begin VB.Menu mnuEditPaste
- Caption = "&Paste"
- Shortcut = ^V
- End
- Begin VB.Menu mnuEditPasteSpecial
- Caption = "Paste &Special..."
- End
- Begin VB.Menu mnuEditBar1
- Caption = "-"
- End
- Begin VB.Menu mnuEditSelectAll
- Caption = "Select &All"
- Shortcut = ^A
- End
- Begin VB.Menu mnuEditInvertSelection
- Caption = "&Invert Selection"
- End
- End
- Begin VB.Menu mnuView
- Caption = "&View"
- Begin VB.Menu mnuViewToolbar
- Caption = "&Toolbar"
- Checked = -1 'True
- End
- Begin VB.Menu mnuViewStatusBar
- Caption = "Status &Bar"
- Checked = -1 'True
- End
- Begin VB.Menu mnuViewBar0
- Caption = "-"
- End
- Begin VB.Menu mnuListViewMode
- Caption = "Lar&ge Icons"
- Index = 0
- End
- Begin VB.Menu mnuListViewMode
- Caption = "S&mall Icons"
- Index = 1
- End
- Begin VB.Menu mnuListViewMode
- Caption = "&List"
- Index = 2
- End
- Begin VB.Menu mnuListViewMode
- Caption = "&Details"
- Index = 3
- End
- Begin VB.Menu mnuViewBar1
- Caption = "-"
- End
- Begin VB.Menu mnuViewArrangeIcons
- Caption = "Arrange &Icons"
- Begin VB.Menu mnuByName
- Caption = "By name"
- End
- Begin VB.Menu mnuByType
- Caption = "By Type"
- End
- Begin VB.Menu mnuBySize
- Caption = "By size"
- End
- Begin VB.Menu mnuViewBar3
- Caption = "-"
- End
- Begin VB.Menu mnuAutoArrange
- Caption = "Auto"
- End
- End
- Begin VB.Menu mnuViewBar2
- Caption = "-"
- End
- Begin VB.Menu mnuViewRefresh
- Caption = "&Refresh"
- End
- Begin VB.Menu mnuViewOptions
- Caption = "&Options..."
- End
- Begin VB.Menu mnuViewWebBrowser
- Caption = "&Web Browser"
- End
- End
- Begin VB.Menu mnuTools
- Caption = "&Tools"
- Begin VB.Menu mnuFind
- Caption = "&Find"
- End
- Begin VB.Menu mnuToolsOptions
- Caption = "&Options..."
- End
- End
- Begin VB.Menu mnuHelp
- Caption = "&Help"
- Begin VB.Menu mnuHelpContents
- Caption = "&Contents"
- End
- Begin VB.Menu mnuHelpSearchForHelpOn
- Caption = "&Search For Help On..."
- End
- Begin VB.Menu mnuHelpBar0
- Caption = "-"
- End
- Begin VB.Menu mnuHelpAbout
- Caption = "&About "
- End
- End
- Begin VB.Menu mnuFilePopUp
- Caption = "FilePopUp"
- Visible = 0 'False
- Begin VB.Menu mnuPopUpRename
- Caption = "Rename"
- End
- Begin VB.Menu mnuPopProperties
- Caption = "Properties"
- End
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Const NAME_COLUMN = 0
- Const TYPE_COLUMN = 1
- Const SIZE_COLUMN = 2
- Const DATE_COLUMN = 3
- Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)
- Public PrimeNod, Iexplorer, ctrlPanel, NetNeigh As Node, BeforLab As String
- Dim mbMoving As Boolean
- Const sglSplitLimit = 500
- Private Sub Dir1_Change()
- File1.path = Dir1.path
- End Sub
- Private Sub Drive1_Change()
- Dir1.path = Drive1.Drive
- End Sub
- Private Sub Form_Load()
- Timer1.Enabled = True
- Timer1.Interval = 1000
- Dim DeskTopNod, PrimeNod, Iexplorer As Node
- Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
- Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
- Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
- Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
- Set DeskTopNod = tvTreeView.Nodes.Add(, , "DESKTOP", "DESKTOP")
- DeskTopNod.image = ExtractIcoForDrives("c:\windows\explorer.exe", 3)
- DeskTopNod.Expanded = True
- BuildMyComputer ("DESKTOP")
- File1.path = "c:\"
- BuildFileList
- BuildDriveNod ("MyComputer")
- lblTitle(1).Caption = "List View: " + Str(lvListView.ListItems.Count) + " Items"
- End Sub
- Private Sub lvListView_AfterLabelEdit(Cancel As Integer, NewString As String)
- Dim result As Integer
- result = renameFile(BeforLab, NewString)
- If result = 1 Then MsgBox "Name change Not Succeded", vbOKOnly
- End Sub
- Private Sub lvListView_BeforeLabelEdit(Cancel As Integer)
- BeforLab = tvTreeView.SelectedItem + "\" + lvListView.SelectedItem
- End Sub
- Private Sub lvListView_Click()
- lvListView.SetFocus
- End Sub
- Private Sub lvListView_DblClick()
- open_file (lvListView.SelectedItem.key)
- End Sub
- Private Sub lvListView_ItemClick(ByVal Item As MSComctlLib.ListItem)
- End Sub
- Private Sub lvListView_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
- If Button = 1 Then
- frmMain.PopupMenu mnuFilePopUp
- End If
- End Sub
- Private Sub lvListView_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
- Select Case Button
- Case 1
- lvListView.Drag vbCancel
-
- Case 2
- ''lvListView.ListItems.Item(lvListView.SelectedItem.Icon).Ghosted = True
- lvListView.DragIcon = ImageList1.ListImages(lvListView.SelectedItem.Icon).ExtractIcon
-
-
- lvListView.DragMode = vbManual
- lvListView.Drag vbBeginDrag
- End Select
- End Sub
- Private Sub mnuFind_Click()
- ' showSearch tvTreeView.SelectedItem.key, tvTreeView.SelectedItem.FullPath, tvTreeView.SelectedItem.image
- End Sub
- Private Sub mnuPopProperties_Click()
- ShowFileInfo lvListView.SelectedItem.key, ImageList1.ListImages(lvListView.SelectedItem.Icon).ExtractIcon
- End Sub
- Private Sub mnuToolsOptions_Click()
- ' frmOptions.Show
- End Sub
- Private Sub mnuViewWebBrowser_Click()
- Dim explorerpath, retval
- lvListView.ListItems.Clear
- explorerpath = GetExplorer
- retval = Shell(explorerpath, vbMaximizedFocus)
- End Sub
- Private Sub Timer1_Timer()
- sbStatusBar.Panels(3).text = Time$
- End Sub
- Private Sub tvTreeView_Click()
- lblTitle(0).Caption = "Current path :" & tvTreeView.SelectedItem
- End Sub
- Private Sub tvTreeView_Collapse(ByVal Node As MSComctlLib.Node)
- Dim i, j As Long
- Dim n, b, v As Node
- Set b = Node.Child
- For i = 0 To Node.Children - 1
- If b.Children > 0 Then
- b.Expanded = False
- Set n = b.Child
- For j = 0 To b.Children - 1
- Set v = n.Next
- tvTreeView.Nodes.Remove n.Index
- Set n = v
- Next j
- End If
-
- Set b = b.Next
- Next i
- End Sub
- Private Sub tvTreeView_DblClick()
- Dim temp
- Dim result
- Select Case tvTreeView.Nodes.Item(tvTreeView.SelectedItem.key).Tag
- Case "ControlPanel"
- lvListView.ListItems.Clear
- temp = Shell("C:\WINDOWS\rundll32.exe shell32.dll,Control_RunDLL", vbNormalFocus)
- Case "NetworkNeightborhood"
- Case "InternetExplorer"
- lvListView.ListItems.Clear
- result = GetExplorer
- temp = Shell(result, vbMaximizedFocus)
- End Select
- End Sub
- Private Sub tvTreeView_DragDrop(Source As Control, x As Single, y As Single)
- Dim nodZ As Node
- Dim FileSource As ListItem
- Dim FileNameSrc, NodDest, a, b As String
- If TypeOf Source Is ListView Then
- Set FileSource = Source.SelectedItem
- Set nodZ = tvTreeView.HitTest(x, y)
- If nodZ <> "DESKTOP" And nodZ <> "Internet Explorer" _
- And nodZ <> "Control Panel" And nodZ <> "Network Neighborhood" _
- And nodZ <> "My computer" Then
- NodDest = nodZ.key + "\" + FileSource
- FileNameSrc = FileSource.key
- FileCopy FileNameSrc, NodDest
- Else
- MsgBox "Invalid Destenation", vbOKOnly, Error
- End If
- End If
- End Sub
- Private Sub tvTreeView_DragOver(Source As Control, x As Single, y As Single, State As Integer)
- If TypeOf Source Is ListView Then
- Select Case State
- Case vbEnter
- tvTreeView.SetFocus
- Case vbLeave
- lvListView.SetFocus
- Case vbOver
- tvTreeView.DropHighlight = tvTreeView.HitTest(x, y)
- End Select
- End If
- End Sub
- Private Sub Form_Paint()
- lvListView.View = Val(GetSetting(App.Title, "Settings", "ViewMode", "0"))
- tbToolBar.Buttons(lvListView.View + LISTVIEW_BUTTON).value = tbrPressed
- mnuListViewMode(lvListView.View).Checked = True
- tvTreeView.SetFocus
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Dim i As Integer
- 'close all sub forms
- For i = Forms.Count - 1 To 1 Step -1
- Unload Forms(i)
- Next
- If Me.WindowState <> vbMinimized Then
- SaveSetting App.Title, "Settings", "MainLeft", Me.Left
- SaveSetting App.Title, "Settings", "MainTop", Me.Top
- SaveSetting App.Title, "Settings", "MainWidth", Me.Width
- SaveSetting App.Title, "Settings", "MainHeight", Me.Height
- End If
- SaveSetting App.Title, "Settings", "ViewMode", lvListView.View
- End Sub
- Private Sub mnuHelpAbout_Click()
- 'To Do
- MsgBox "About Box Code goes here!"
- End Sub
- Private Sub mnuViewOptions_Click()
- 'To Do
- MsgBox "Options Dialog Code goes here!"
- End Sub
- Private Sub mnuViewStatusBar_Click()
- If mnuViewStatusBar.Checked Then
- sbStatusBar.Visible = False
- mnuViewStatusBar.Checked = False
- Else
- sbStatusBar.Visible = True
- mnuViewStatusBar.Checked = True
- End If
- SizeControls imgSplitter.Left
- End Sub
- Private Sub mnuViewToolbar_Click()
- If mnuViewToolbar.Checked Then
- tbToolBar.Visible = False
- mnuViewToolbar.Checked = False
- Else
- tbToolBar.Visible = True
- mnuViewToolbar.Checked = True
- End If
- SizeControls imgSplitter.Left
- End Sub
- Private Sub Form_Resize()
- On Error Resume Next
- If Me.Width < 3000 Then Me.Width = 3000
- SizeControls imgSplitter.Left
- End Sub
- Private Sub imgSplitter_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
- With imgSplitter
- picSplitter.Move .Left, .Top, .Width \ 2, .Height - 20
- End With
- picSplitter.Visible = True
- mbMoving = True
- End Sub
- Private Sub imgSplitter_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
- Dim sglPos As Single
- If mbMoving Then
- sglPos = x + imgSplitter.Left
- If sglPos < sglSplitLimit Then
- picSplitter.Left = sglSplitLimit
- ElseIf sglPos > Me.Width - sglSplitLimit Then
- picSplitter.Left = Me.Width - sglSplitLimit
- Else
- picSplitter.Left = sglPos
- End If
- End If
- End Sub
- Private Sub imgSplitter_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
- SizeControls picSplitter.Left
- picSplitter.Visible = False
- mbMoving = False
- End Sub
- Sub SizeControls(x As Single)
- On Error Resume Next
- 'set the width
- If x < 1500 Then x = 1500
- If x > (Me.Width - 1500) Then x = Me.Width - 1500
- tvTreeView.Width = x
- imgSplitter.Left = x
- lvListView.Left = x + 40
- lvListView.Width = Me.Width - (tvTreeView.Width + 140)
- lblTitle(0).Width = tvTreeView.Width
- lblTitle(1).Left = lvListView.Left + 20
- lblTitle(1).Width = lvListView.Width - 40
- 'set the top
- If tbToolBar.Visible Then
- tvTreeView.Top = tbToolBar.Height + picTitles.Height
- Else
- tvTreeView.Top = picTitles.Height
- End If
- lvListView.Top = tvTreeView.Top
- 'set the height
- If sbStatusBar.Visible Then
- tvTreeView.Height = Me.ScaleHeight - (picTitles.Top + picTitles.Height + sbStatusBar.Height)
- Else
- tvTreeView.Height = Me.ScaleHeight - (picTitles.Top + picTitles.Height)
- End If
- lvListView.Height = tvTreeView.Height
- imgSplitter.Top = tvTreeView.Top
- imgSplitter.Height = tvTreeView.Height
- End Sub
- Private Sub TreeView1_DragDrop(Source As Control, x As Single, y As Single)
- If Source = imgSplitter Then
- SizeControls x
- End If
- End Sub
- Private Sub tbToolBar_ButtonClick(ByVal Button As MSComctlLib.Button)
- Select Case Button.key
- Case "Back"
- 'To Do
- MsgBox "Back Code goes here!"
- Case "Forward"
- 'To Do
- MsgBox "Forward Code goes here!"
- Case "Cut"
- mnuEditCut_Click
- Case "Copy"
- mnuEditCopy_Click
- Case "Paste"
- mnuEditPaste_Click
- Case "Delete"
- mnuFileDelete_Click
- Case "Properties"
- mnuFileProperties_Click
- Case "View Large icons"
- mnuListViewMode_Click lvwIcon
- Case "View Small icons"
- mnuListViewMode_Click lvwSmallIcon
- Case "View List"
- mnuListViewMode_Click lvwList
- Case "View Details"
- mnuListViewMode_Click lvwReport
- Case "Find"
- mnuFind_Click
- End Select
- End Sub
- Private Sub mnuHelpContents_Click()
- Dim nRet As Integer
- 'if there is no helpfile for this project display a message to the user
- 'you can set the HelpFile for your application in the
- 'Project Properties dialog
- If Len(App.HelpFile) = 0 Then
- MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption
- Else
- On Error Resume Next
- nRet = OSWinHelp(Me.hwnd, App.HelpFile, 3, 0)
- If Err Then
- MsgBox Err.Description
- End If
- End If
- End Sub
- Private Sub mnuHelpSearch_Click()
- Dim nRet As Integer
- 'if there is no helpfile for this project display a message to the user
- 'you can set the HelpFile for your application in the
- 'Project Properties dialog
- If Len(App.HelpFile) = 0 Then
- MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption
- Else
- On Error Resume Next
- nRet = OSWinHelp(Me.hwnd, App.HelpFile, 261, 0)
- If Err Then
- MsgBox Err.Description
- End If
- End If
- End Sub
- Private Sub mnuVAIByDate_Click()
- 'To Do
- ' lvListView.SortKey = DATE_COLUMN
- End Sub
- Private Sub mnuVAIByName_Click()
- 'To Do
- ' lvListView.SortKey = NAME_COLUMN
- End Sub
- Private Sub mnuVAIBySize_Click()
- 'To Do
- ' lvListView.SortKey = SIZE_COLUMN
- End Sub
- Private Sub mnuVAIByType_Click()
- 'To Do
- ' lvListView.SortKey = TYPE_COLUMN
- End Sub
- Private Sub mnuListViewMode_Click(Index As Integer)
- 'uncheck the current type
- mnuListViewMode(lvListView.View).Checked = False
- 'set the listview mode
- lvListView.View = Index
- 'check the new type
- mnuListViewMode(Index).Checked = True
- 'set the toolabr to the same new type
- tbToolBar.Buttons(Index + LISTVIEW_BUTTON).value = tbrPressed
- End Sub
- Private Sub mnuViewLineUpIcons_Click()
- 'To Do
- lvListView.Arrange = lvwAutoLeft
- End Sub
- Private Sub mnuViewRefresh_Click()
- 'To Do
- MsgBox "Refresh Code goes here!"
- End Sub
- Private Sub mnuEditCopy_Click()
- 'To Do
- MsgBox "Copy Code goes here!"
- End Sub
- Private Sub mnuEditCut_Click()
- 'To Do
- MsgBox "Cut Code goes here!"
- End Sub
- Private Sub mnuEditDSelectAll_Click()
- 'To Do
- MsgBox "Select All Code goes here!"
- End Sub
- Private Sub mnuEditInvertSelection_Click()
- 'To Do
- MsgBox "Invert Selection Code goes here!"
- End Sub
- Private Sub mnuEditPaste_Click()
- 'To Do
- MsgBox "Paste Code goes here!"
- End Sub
- Private Sub mnuEditPasteSpecial_Click()
- 'To Do
- MsgBox "Paste Special Code goes here!"
- End Sub
- Private Sub mnuEditUndo_Click()
- 'To Do
- MsgBox "Undo Code goes here!"
- End Sub
- Private Sub mnuFileOpen_Click()
- response = MsgBox("Open " + Left(lvListView.SelectedItem, 4) + " program", vbYesNoCancel)
- If response Then
- open_file (lvListView.SelectedItem.key)
- End If
- End Sub
- Private Sub mnuFileFind_Click()
- 'To Do
- MsgBox "Find Code goes here!"
- End Sub
- Private Sub mnuFileSendTo_Click()
- 'To Do
- MsgBox "Send To Code goes here!"
- End Sub
- Private Sub mnuFileNew_Click()
- 'To Do
- MsgBox "New File Code goes here!"
- End Sub
- Private Sub mnuFileDelete_Click()
- response = MsgBox("Delete " + tvTreeView.SelectedItem + "\" + lvListView.SelectedItem, vbYesNoCancel)
- If response = vbYes Then
- Kill (lvListView.SelectedItem.key)
- lvListView.ListItems.Remove (lvListView.SelectedItem.Index)
- lvListView.Refresh
- End If
- End Sub
- Private Sub mnuFileRename_Click()
- lvListView.StartLabelEdit
- End Sub
- Private Sub mnuFileProperties_Click()
- ShowFileInfo lvListView.SelectedItem.key, ImageList1.ListImages(lvListView.SelectedItem.Icon).ExtractIcon
- End Sub
- Private Sub mnuFileMRU_Click(Index As Integer)
- 'To Do
- MsgBox "MRU Code goes here!"
- End Sub
- Private Sub mnuFileClose_Click()
- 'unload the form
- Unload Me
- End Sub
- Public Function extractico(ByVal appname As String, ByVal numIcon As Long) As Integer
- Dim MyInst, i As Long
- Dim img As ListImage
- Dim nIcon, hIcon, draw, isdraw As Long
- If ImageList1.ListImages.Count >= 1 Then
- For i = 1 To ImageList1.ListImages.Count
- If ImageList1.ListImages(i).key = appname + Str(numIcon) Then
- extractico = i
- Exit Function
- End If
- Next i
- End If
- MyInst = GetModuleHandle(appname)
- Picture1.Picture = LoadPicture("")
- hIcon = ExtractIcon(MyInst, appname, numIcon)
- nIcon = LoadIcon(MyInst, hIcon)
- Picture1.AutoRedraw = True
- draw = DrawIcon(Picture1.hdc, Picture1.CurrentX, Picture1.CurrentY, hIcon)
- If draw = 1 Then
- Picture1.Refresh
- Set img = ImageList1.ListImages.Add(ImageList1.ListImages.Count + 1, appname + Str(numIcon), Picture1.image)
- extractico = ImageList1.ListImages.Count
- Else
- extractico = -1
- End If
- End Function
- Public Function ExtractSmallIco(ByVal appname As String, ByVal numIcon As Integer) As Long
- Dim MyInst, i As Long
- Dim img As ListImage
- Dim nIcon, hIcon, draw, isdraw As Long
- If ImageList2.ListImages.Count > 1 Then
- For i = 1 To ImageList2.ListImages.Count
- If ImageList2.ListImages(i).key = appname + Str(numIcon) Then
- ExtractSmallIco = i
- Exit Function
- End If
- Next i
- End If
- MyInst = GetModuleHandle(appname)
- Picture2.Picture = LoadPicture("")
- hIcon = ExtractIcon(MyInst, appname, numIcon)
- nIcon = LoadIcon(MyInst, hIcon)
- Picture2.AutoRedraw = True
- draw = DrawIcon(Picture2.hdc, Picture2.CurrentX, Picture2.CurrentY, hIcon)
- If draw = 1 Then
- Picture1.Refresh
- Set img = ImageList2.ListImages.Add(ImageList2.ListImages.Count + 1, appname + Str(numIcon), Picture2.image)
- ExtractSmallIco = ImageList2.ListImages.Count
- Else
- ExtractSmallIco = 1
- End If
- End Function
- Public Function ExtractIcoForDrives(appname As String, numIcon As Integer) As Long
- ''ExtractIcoForDrives = 1
- ''Exit Function
- Dim MyInst, i As Long
- Dim img As ListImage
- Dim nIcon, hIcon, draw, isdraw As Long
- If ImageList3.ListImages.Count > 1 Then
- For i = 1 To ImageList3.ListImages.Count
- If ImageList3.ListImages(i).key = appname + Str(numIcon) Then
- ExtractIcoForDrives = i
- Exit Function
- End If
- Next i
- End If
- MyInst = GetModuleHandle(appname)
- Picture3.Picture = LoadPicture("")
- hIcon = ExtractIcon(MyInst, appname, numIcon)
- nIcon = LoadIcon(MyInst, hIcon)
- Picture3.AutoRedraw = True
- draw = DrawIcon(Picture3.hdc, Picture3.CurrentX, Picture3.CurrentY, hIcon)
- If draw = 1 Then
- Picture1.Refresh
- Set img = ImageList3.ListImages.Add(ImageList3.ListImages.Count + 1, appname + Str(numIcon), Picture3.image)
- ExtractIcoForDrives = ImageList3.ListImages.Count
- Else
- ExtractIcoForDrives = 1
- End If
- End Function
- Public Function BuildDriveNod(Key1 As String)
- Dim FileName, DriveType, text As String
- Dim i, j, z, x, e As Integer
- Dim fs, d, s
- Dim pat, drlst, drvlst, flst, len1 As String
- Dim PrimeNod, nod, nod1, nod3 As Node
- Dim fil1 As ListItem
- On Error GoTo Error1
- For e = 0 To Drive1.ListCount - 1
- len1 = Trim(Left(Drive1.List(e), 3))
- DriveType = GetDriveType(Left(Drive1.List(e), 2) + "\")
- text = Drive1.List(e)
- Set nod3 = tvTreeView.Nodes.Add(Key1, tvwChild, len1, text)
- Select Case DriveType
- Case 0
- nod3.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 12)
- Case 1
- nod3.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 12)
- Case 2
- nod3.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 6)
- Case 3
- nod3.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 8)
- Case 4
- nod3.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 9)
- Case 5
- nod3.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 11)
- End Select
- ''Dir1.Path = len1 + "\"
- BuildDirNode (len1)
- Next e
- Exit Function
- Error1:
- Resume n
- MsgBox Err.Description
- End Function
- Public Function BuildDirNode(Key1 As String)
- Dim i, j, z, x, e As Integer
- Dim pat, drlst, drvlst, flst, len1, temp, midtest As String
- Dim PrimeNod, nod, nod1, nod3 As Node
- pat = Dir1.path
- If Right(Key1, 1) <> "\" Then
- Dir1.path = Key1 + "\"
- Else
- Dir1.path = Key1 '' + "\"
- ''pat = Dir1.Path
- End If
- For i = 0 To Dir1.ListCount - 1
- If Mid(Dir1.List(i), 5, 1) <> "\" Then
- midtest = Dir1.List(i)
- Else
- midtest = Trim(Mid(Dir1.List(i), 1, 4)) + Trim(Mid(Dir1.List(i), 6, 100))
- End If
- temp = Dir1.List(i)
- Set nod = tvTreeView.Nodes.Add(Key1, tvwChild, midtest, Mid$(Dir1.List(i), 2 + Len(Key1), 100))
- tvTreeView.Nodes.Item(Dir1.List(i)).Tag = "dir"
- nod.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 3)
- Next i
- Dir1.path = pat
- End Function
- Public Function BuildFileList()
- Dim IconFileName, FileName, resultQryReg, dirpath As String
- Dim z, iconum As Integer
- Dim IconFileNum As Long
- Dim pat, drlst, drvlst, flst As String
- Dim fil1 As ListItem
- Dim fs, f, s
- Set fs = CreateObject("Scripting.FileSystemObject")
- For z = 0 To File1.ListCount - 1
- flst = File1.List(z)
- If Right(File1.path, 1) <> "\" Then
- dirpath = File1.path + "\"
- Else
- dirpath = File1.path
- End If
- Set f = fs.GetFile(dirpath + File1.List(z))
- Set fil1 = lvListView.ListItems.Add(, dirpath + File1.List(z), File1.List(z))
- fil1.SubItems(1) = dirpath
- fil1.SubItems(2) = f.Size
- fil1.SubItems(3) = f.Type
- ''lvListView.ListItems.Item(File1.List(z)).Tag = "File"
- resultQryReg = qryReg(Right(File1.List(z), 4))
- If Trim(resultQryReg) = "" Then
- resultQryReg = "c:\windows\system\shell32.dLl,0"
- ElseIf Mid(resultQryReg, 1, 1) = "%" Then
- resultQryReg = dirpath + File1.List(z) + "," + Str(CInt(Mid(resultQryReg, 2, 2) - 1))
- End If
- IconFileName = Mid(resultQryReg, 1, InStr(1, resultQryReg, ",", vbTextCompare) - 1)
- IconFileNum = (Mid(resultQryReg, InStr(1, resultQryReg, ",", vbTextCompare) + 1, 5))
- iconum = extractico(IconFileName, IconFileNum)
- If iconum = -1 Then
- Select Case Right(File1.List(z), 3)
- Case "EXE"
- fil1.Icon = extractico("c:\windows\system\shell32.dll", 2)
- ''fil1.SmallIcon = ExtractSmallIco("c:\windows\system\shell32.dll", 2)
- Case Else
- fil1.Icon = extractico("c:\windows\system\shell32.dll", 0)
- ''fil1.SmallIcon = ExtractSmallIco("c:\windows\system\shell32.dll", 0)
- End Select
- Else
- fil1.Icon = iconum
- ''fil1.SmallIcon = iconum
- End If
- Next z
- End Function
- Public Function BuildMyComputer(Key1 As String)
- Dim explorerpath As String
- Set PrimeNod = tvTreeView.Nodes.Add(Key1, tvwChild, "MyComputer", "My Comupter")
- PrimeNod.Expanded = True
- PrimeNod.image = ExtractIcoForDrives("c:\windows\explorer.exe", 0)
- ''tvTreeView.Nodes.Item(Dir1.List(i)).Tag = "dir"
- Set ctrlPanel = tvTreeView.Nodes.Add(Key1, tvwChild, "ControlPanel", "Control Panel")
- ctrlPanel.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 35)
- tvTreeView.Nodes.Item(ctrlPanel.key).Tag = "ControlPanel"
- Set Iexplorer = tvTreeView.Nodes.Add(Key1, tvwChild, "IEXPLORER", "Internet Explorer")
- explorerpath = GetExplorer
- explorerpath = Mid(explorerpath, 2, 33)
- Iexplorer.image = ExtractIcoForDrives(Trim(explorerpath), 0)
- tvTreeView.Nodes.Item(Iexplorer.key).Tag = "InternetExplorer"
- Set NetNeigh = tvTreeView.Nodes.Add(Key1, tvwChild, "NetworkNeighborhood", "Network Neighborhood")
- NetNeigh.image = ExtractIcoForDrives("c:\windows\system\shell32.dll", 17)
- ''tvTreeView.Nodes.Item(NetNiegh.key).Tag = "NetworkNeightborhood"
- End Function
- Private Sub tvTreeView_Expand(ByVal Node As MSComctlLib.Node)
- Dim i, j As Integer
- Dim pat, drlst As String
- Dim nod, nod1 As Node
- Dim key As Long
- On Err GoTo error2
- If Node.key = "DESKTOP" Then
- BuildDriveNod ("MyComputer")
- ElseIf Node.key = "MyComputer" Then
- BuildDriveNod (Drive1.List(j))
- Else
- Screen.MousePointer = 11
- ''tvTreeView.Nodes.Remove (Node.key)
- Dir1.path = Node.key + "\"
- For i = 0 To Dir1.ListCount - 1
- If Mid(Dir1.List(i), 5, 1) <> "\" Then
- midtest = Dir1.List(i)
- Else
- midtest = Trim(Mid(Dir1.List(i), 1, 4)) + Trim(Mid(Dir1.List(i), 6, 100))
- End If
- BuildDirNode (midtest)
- Next i
- End If
- Screen.MousePointer = 0
- Exit Sub
- error2:
- Resume i
- End Sub
- Private Sub tvTreeView_NodeClick(ByVal Node As MSComctlLib.Node)
- Dim fil1 As ListItem
- Dim i, z, iconum As Integer
- Dim IconFileNum, retval As Long
- Dim path, explorerpath As String
- Dim flst, resultQryReg, IconFileName, dirpath As String
- Dim fs, f, s, d
- 'On Error GoTo eh
- Set fs = CreateObject("Scripting.FileSystemObject")
- For i = 0 To Drive1.ListCount - 1
- If Node.text = Drive1.List(i) Then
- Set d = fs.GetDrive(Drive1.List(i))
- If d.isready Then
- path = Drive1.List(i) + "\"
- File1.path = path
- is_equal = True
- sbStatusBar.Panels(1).text = "Free Space: " & FormatNumber(d.FreeSpace / 1024, 0) & "MB"
- End If
- Exit For
- End If
- Next i
- Select Case Node.key
- Case "DESKTOP"
- File1.path = "c:\windows\desktop"
- Case "IEXPLORER"
- lvListView.ListItems.Clear
- explorerpath = GetExplorer
- retval = Shell(explorerpath, vbMaximizedFocus)
- Case "ControlPanel"
- lvListView.ListItems.Clear
- retval = Shell("C:\WINDOWS\rundll32.exe shell32.dll,Control_RunDLL", vbMaximizedFocus)
- Case "NetworkNeighborhood"
- MsgBox "Not Available Yet", vbOKOnly, "setup"
- Case "MyComputer"
- Case Else
- 'File1.path = Node.key
- lvListView.ListItems.Clear
- ''lvListView.View = lvwIcon
- For z = 0 To File1.ListCount - 1
- flst = File1.List(z)
- If Right(File1.path, 1) <> "\" Then
- dirpath = File1.path + "\"
- Else
- dirpath = File1.path
- End If
- Set f = fs.GetFile(dirpath + File1.List(z))
- Set fil1 = lvListView.ListItems.Add(, dirpath + File1.List(z), File1.List(z))
- fil1.SubItems(1) = dirpath
- fil1.SubItems(2) = f.Size
- fil1.SubItems(3) = f.Type
- ''lvListView.ListItems(File1.List(z)).Tag = "File"
- resultQryReg = qryReg(Right(File1.List(z), 4))
- If Trim(resultQryReg) = "" Then
- resultQryReg = "c:\windows\system\shell32.dll,0"
- ElseIf Mid(resultQryReg, 1, 1) = "%" Then
- resultQryReg = dirpath + File1.List(z) + "," + Str(CInt(Mid(resultQryReg, 2, 2) - 1))
-
- End If
- If InStr(1, resultQryReg, ",", vbTextCompare) = 0 Then
- resultQryReg = resultQryReg + ",0"
- End If
- IconFileName = Mid(resultQryReg, 1, InStr(1, resultQryReg, ",", vbTextCompare) - 1)
- IconFileNum = (Mid(resultQryReg, InStr(1, resultQryReg, ",", vbTextCompare) + 1, 5))
- iconum = extractico(IconFileName, IconFileNum)
- If iconum = -1 Then
- Select Case Right(File1.List(z), 3)
- Case "EXE"
- fil1.Icon = extractico("c:\windows\system\shell32.dll", 2)
- ''fil1.SmallIcon = ExtractSmallIco("c:\windows\system\shell32.dll", 2)
- Case Else
- fil1.Icon = extractico("c:\windows\system\shell32.dll", 0)
- ''fil1.SmallIcon = ExtractSmallIco("c:\windows\system\shell32.dll", 0)
- End Select
- Else
- fil1.Icon = iconum
- ''fil1.SmallIcon = iconum
- End If
- Next z
- lblTitle(1).Caption = "List View: " + Str(lvListView.ListItems.Count) + " Items"
- End Select
- 'MsgBox "Device Not Ready", vbOKOnly
- 'Resume Next
- End Sub
-